<template>
	<div class="productHistory">
            <div class="productsee" v-loading = "loading">
				  <div class="title"></div>
                    <div v-if="shopshow">
                        <div class="palt">
                            <div class="pl">修改人:</div><div class="pr">{{article.originator}}</div>
                        </div>
                        <div class="palt">
                            <div class="pl">产品名称:</div><div class="pr">{{article.title}}</div>
                        </div>
                        <div class="palt">
                            <div class="pl">商品名称:</div><div class="pr">{{article.name}}</div>
                        </div>

                        <div class="palt">
                            <div class="pl">商家编码:</div><div class="pr">{{article.fetch_code}}</div>
                        </div>
                        <div class="palt">
                            <div class="pl">京东特有:</div><div class="pr">{{article.fetch_code2}}</div>
                        </div>
                        <div class="palt">
                            <div class="pl">卖点:</div><div class="pr">{{article.selling_point}}</div>
                        </div>
                        <div class="palt">
                            <div class="pl">结算要求:</div><div class="pr">{{article.commission_rule}}</div>
                        </div>
                        <div class="palt">
                            <div class="pl">是否需要照片:</div><div class="pr"><div v-if="article.is_need_photo == 0"> 无需照片</div>
                            <div v-if="article.is_need_photo == 1"> 需要照片</div></div>
                        </div>

                    </div>

					<div class="beizhutitle">产品详情:</div>
					<div class="beizhualt" v-html="article.description"></div>
					<div class="beizhutitle">修改提要:</div>
					<div class="beizhualt" style="padding-bottom:50px;">{{article.commit}}</div>
				</div>
	</div>
</template>

<script>
	import axios from "axios";
	import top from '@/components/top.vue'
    import left from '@/components/left.vue'
    import foot from "@/components/foot.vue"
	export default{
		components: {
			"left": left,
            "top": top,
            "foot": foot
		},
		name: 'kanban',
		data(){
			return{
				article:{},
				loading:true,
				jilu:[],
                shopshow:true
			}
		},
		created() {
			console.log(this.$route.query.id)
			var that = this

			//获取产品detail
			axios.get("/api/plan-market/product/plan/verify_logs?action=detail&type="+this.$route.query.type+"&product_id="+this.$route.query.id)
			.then(function(response){
				that.jilu = response.data.data
				that.article = response.data.data
                if(that.article.operator == 10086){ that.article.operator = "移动"}
                if(that.article.operator == 10000){ that.article.operator = "电信"}
                if(that.article.operator == 10010){ that.article.operator = "联通"}
                if(that.article.operator == 10099){ that.article.operator = "中国广电"}

                if(that.article.real_name_type == 1){ that.article.real_name_type = "需要"}
                if(that.article.real_name_type == 0){ that.article.real_name_type = "不需要"}

				that.loading = false
                // if(that.article.order_pages_id != that.article.plan_order_pages_id){
                //     that.shopshow = false
                // }

			})

		},
        methods: {
        	//选择版本执行
        	handleCommand(id) {
        		this.loading = true
                //获取产品
                var that = this
                if(this.$route.query.type == 1){
                    axios.get("/api/plan-market/product/plan/verify_logs?action=detail&type="+this.$route.query.type+"&id="+id)
                    .then(function(response){
                    	that.article = response.data.data[0]
                        if(that.article.operator == 10086){ that.article.operator = "移动"}
                        if(that.article.operator == 10000){ that.article.operator = "电信"}
                        if(that.article.operator == 10010){ that.article.operator = "联通"}
                        if(that.article.operator == 10099){ that.article.operator = "中国广电"}

                    	that.loading = false
                    })
                }else{
                    axios.get("/api/plan-market/product/plan/verify_logs?action=detail&type="+this.$route.query.type+"&id="+id)
                    .then(function(response){
                    	that.article = response.data.data[0]
                    	that.loading = false
                    })
                }

          }

        }
	}
</script>

<style lang="scss" scoped>
	.productHistory{
		margin: 0; padding: 0; background: #EFEFEF;

        .productsee{ color: #666666; background: #FFFFFF; width: 1000px; margin: 0 auto;}
        .title{ padding: 20px; font-size: 27px;}
        .alt{ display: flex; padding-left: 20px;}

        @media screen and (max-width: 1000px) {
          .productsee{ width: 100% !important; color: #666666; background: #FFFFFF !important;}
          .title{ padding: 20px; font-size: 18px; }
          .alt{ display: flex; padding-left: 20px;}
        }


        .altli{ margin-right: 30px;}
        .altli .name{ color: #FFA200;}
        .altli .se{ color: #3399FF; }
        .select{ cursor: pointer;}
        .ptitle{ line-height: 48px; display: flex; align-items: center; height: 48px; background: #F5F5F5; margin-top: 40px; margin-bottom: 20px; padding-left: 30px; color: #333;}
        .pline{ border-left: 5px #F7931E solid; height: 16px; line-height: 16px; padding-left: 20px;}
        .palt{ display: flex; margin: 15px 0; font-size: 14px;}
        .pl{ flex-basis: 100px; text-align: right; margin-right: 10px; margin-bottom: 20px;}
        .pr{}
        .beizhutitle{ padding: 20px 0; padding-left: 50px; background: #eaeaea}
        .beizhualt{ font-size: 14px; margin-bottom: 20px; padding: 50px 20px;}
	}
</style>
